from pprint import pprint

from selenium import webdriver

driver = webdriver.Chrome()
driver.get('https://www.baidu.com/')

# 获得所有cookie信息
pprint(driver.get_cookies())

# 返回特定name有cookie信息
pprint(driver.get_cookie('ZFY'))

# 添加cookie,必须有name和value的值
# driver.add_cookie(dict)
# 删除特定的cookie信息
# driver.delete_cookie('ZFY')
# 删除所有cookie信息
# driver.delete_all_cookies()
